# coding = utf-8
from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import QrCodeAPIView, SwipeImageViewSet, UserRoleViewSet, QrCodeWithBgAPIView, WxUserInfoViewSet, \
    MemberRoleViewSet, WxMenuAPIView, WxSwipeImageViewSet, SwipeImageUploadAPIView, get_user_info, \
    QrCodeWithLogoAPIView, UserLoginQrCode, VideoLoginUserInfo

router = DefaultRouter()
router.register(r'swipe', SwipeImageViewSet, basename="swipe")
router.register(r'swipe_image', WxSwipeImageViewSet, basename="swipe-image")
router.register(r'role', UserRoleViewSet, basename="role")
router.register(r'wxuser', WxUserInfoViewSet, basename="wechat-user")
router.register(r'member_role', MemberRoleViewSet, basename="member-role")

urlpatterns = [
    path('qrcode/', QrCodeAPIView.as_view(), name="qr-code"),
    path('qrcodelogo/', QrCodeWithLogoAPIView.as_view(), name="qr-code-logo"),
    path('qrbgcode/', QrCodeWithBgAPIView.as_view(), name="qr-code-bg"),
    path('menu/', WxMenuAPIView.as_view(), name='wechat-menu'),
    path('swipe_image_upload/', SwipeImageUploadAPIView.as_view(), name='swipe-image-upload'),
    path('userinfo/', get_user_info, name='wxchat-user-info'),
    path('user_login_qrcode/', UserLoginQrCode.as_view(), name='wxchat-user-login-qrcode'),
    path('video_user_info/', VideoLoginUserInfo.as_view(), name='video-login-user-info'),
]

urlpatterns += router.urls